//
//  CollectionViewCell.swift
//  TCMHealth
//
//  Created by 韩颖 on 2023/7/15.
//

import UIKit
import TextFieldEffects

class MedicationCell: UICollectionViewCell {

    @IBOutlet weak var medicationNameLabel: UILabel!
    @IBOutlet weak var medicationWeightLabel: TextFieldEffects!
    var deleteItem: (()->Void)?
    
    override func awakeFromNib() {
        super.awakeFromNib()
    }
    
    var medicationInfo: [String:String] {
        set {
            medicationNameLabel.text = newValue.keys.first
            medicationWeightLabel.text = newValue.values.first
        }
        
        get {
            return self.medicationInfo
        }
    }
  
    
    @IBAction func deleteItem(_ sender: Any) {
        self.deleteItem?()
    }
    

}
